x86: properly check XEN_DOMCTL_ioport_mapping arguments for invalid range
authorJan Beulich <jbeulich@suse.com>
Wed, 19 Sep 2012 07:27:55 +0000 (09:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 19 Sep 2012 07:27:55 +0000 (09:27 +0200)
commit7be78546fb2d3e05e28cbe0a7525e85cc652ff08
tree989ece4cb0d8ddd9197486b022c983b21075666e
parent96f0763e3f86af23d47aaaaf760d521815a97b61
x86: properly check XEN_DOMCTL_ioport_mapping arguments for invalid range

In particular, the case of "np" being a very large value wasn't handled
correctly. The range start checks also were off by one (except that in
practice, when "np" is properly range checked, this would still have
been caught by the range end checks).

Also, is a GFN wrap in XEN_DOMCTL_memory_mapping really okay?

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/domctl.c